package service;

import dao.UserDao;
import po.User;

public class UserServiceImpl implements UserService {
	
	private UserDao userDao;

	@Override
	public User selectById(Long id) {
		
		return userDao.selectById(id);
	}

	@Override
	public void insert(User user) {

		userDao.insert(user);
	}

	@Override
	public void update(User user) {
		
		userDao.update(user);
	}

	@Override
	public void delete(Long userId) {

		userDao.delete(2l);
		userDao.delete(7l);
		userDao.delete(8l);
		
		throw new ArrayIndexOutOfBoundsException();
	}

	public UserDao getUserDao() {
		return userDao;
	}

	public void setUserDao(UserDao userDao) {
		this.userDao = userDao;
	}

}
